Conversation
|
@juliesaia is attempting to deploy a commit to the Convex Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughModified the token fetch in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When setting
fetchOptions: {throw: true}on your auth client, all authenticated convex functions will fail with "unauthenticated".This is because
fetchAccessTokenassumes thatauthClient.convex.token()will return{data, error}. When throw is set to true, it just returns the data as is.This PR sets fetch: false to this one call so the returned object is always correct. Not 100% sure if this is the cleanest solution, but this is the only time the users authClient itself is used anywhere in the package so i imagine its probably fine. Just wanted to submit a fix of some kind :)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.